<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>发布信息内容配置</title>
	<style type="text/css">
		.fileds {
			bgcolor:#0000dd; 
			width:100px;
			margin-right:10px
		}
	</style>
	<link rel="stylesheet" type="text/css" href="${ctx}/js/jquery-ui/jquery-ui-1.8.11.custom.css"/>
    <script src="${ctx}/js/jquery-ui/jquery-ui-1.8.11.custom.min.js"></script>  
	<script type="text/javascript">
		function checkPublishConfig() {
		    var applicationRootPath = $("#applicationRootPath").val();
			var db = $("#db").val();
			var host = $("#host").val();
			var port = $("#port").val();
			var dbName = $("#dbName").val();
			var userName = $("#userName").val();
			var password = $("#password").val();
			var publishTableName = $("#publishTableName");
			
			var taskId = $("#taskId").val();
			var taskMsg = $("#taskMsg");
			
			var applicationRootPathMsg = $("#applicationRootPathMsg");
			var dbMsg = $("#dbMsg");
			var hostMsg = $("#hostMsg");
			var portMsg = $("#portMsg");
			var dbNameMsg = $("#dbNameMsg");
			var userNameMsg = $("#userNameMsg");
			var passwordMsg = $("#passwordMsg");
			var publishTableNameMsg = $("#publishTableNameMsg");
			
			var applicationRootPathRs = true;
			var dbRs = true;
			var hostRs = true;
			var portRs = true;
			var dbNameRs = true;
			var userNameRs = true;
			var passwordRs = true;
			var publishTableNameRs = true;
			
			var taskIdRs = true;
			
			if($.trim(taskId) == "") {
				taskMsg.html("没有指定任何任务");
				taskIdRs = false;
			} else {
				taskMsg.html("");
				taskIdRs = true;
			}
			
			if($.trim(applicationRootPath) == "") {
				applicationRootPathMsg.html("数据库管理系统不能为空");
				applicationRootPathRs = false;
			} else {
				applicationRootPathMsg.html("");
				applicationRootPathRs = true;
			}
			
			if($.trim(db) == "") {
				dbMsg.html("数据库管理系统不能为空");
				dbRs = false;
			} else {
				dbMsg.html("");
				dbRs = true;
			}
			
			if($.trim(host) == "") {
				hostMsg.html("主机名不能为空");
				hostRs = false;
			} else {
				hostMsg.html("");
				hostRs = true;
			}
			
			if($.trim(port) == "") {
				portMsg.html("端口号不能为空");
				portRs = false;
			} else {
				portMsg.html("");
				portRs = true;
			}
			
			if($.trim(dbName) == "") {
				dbNameMsg.html("数据库名称不能为空");
				dbNameRs = false;
			} else {
				dbNameMsg.html("");
				dbNameRs = true;
			}
			
			if($.trim(userName) == "") {
				userNameMsg.html("数据库用户名不能为空");
				userNameRs = false;
			} else {
				userNameMsg.html("");
				userNameRs = true;
			}
			
			if($.trim(publishTableName) == "") {
				publishTableNameMsg.html("发布表名称不能为空");
				publishTableNameRs = false;
			} else {
				publishTableNameMsg.html("");
				publishTableNameRs = true;
			}
			
			return applicationRootPathRs && dbRs && hostRs && portRs && dbNameRs && userNameRs && passwordRs && taskIdRs && publishTableNameRs;
		}
		
		function changeDb() {
			var db = $("#db").val();
			var port = $("#port");
			if(db == "MYSQL") {
				port.val(3306);
			} else if(db == "SQLSERVER") {
				port.val(1433);
			} else if(db == "SQLSERVER2005") {
				port.val(1433);
			} else if(db == "ORACLE") {
				port.val(1521);
			}
		}
		
		function changeModelType(opt) {
			changeModelOrData(opt);
		}
		
		function changeDataType(opt) {
			changeModelOrData(opt);
		}
		
		function changeModelOrData(opt) {
			var modelType = $("."+opt+"ModelType:checked").val();
			var dataType = $("."+opt+"DataType:checked").val();
			
			
			var expressionDivObj = $("#"+opt+"ExpressionDiv");
			var noDateDivObj = $("#"+opt+"NoDateDiv");
			var dateDivObj = $("#"+opt+"DateDiv");
			
			expressionDivObj.hide();
			noDateDivObj.hide();
			dateDivObj.hide();
			
			if(modelType == "VALUE") {
			    if(dataType == "DATE") {
					dateDivObj.show();
				} else {
					noDateDivObj.show();
				}
			} else {
				expressionDivObj.show();
			}
		}
		
		function addFieldModel() {
			$("#createCollectionModelToPublishModel").dialog("open");
		}
		
		function createFieldModel(opt) {
			var name = $("#"+opt+"FieldName").val();
			var modelType = $("."+opt+"ModelType:checked").val();
			var dataType = $("."+opt+"DataType:checked").val();
			
			var trObj = "";
			var listObj = $("#fieldModelList");
			var inputName = "";
		
			var lastTr = listObj.find("tr:last");
			var lastTrId = "";
			if(opt == "update") {
				lastTrId = $("#currentTrId").val();
			} else {
				lastTrId = lastTr.attr("id");
			}
			var indexs = lastTrId.split("_");
			if(indexs.length == 2) {
				  var index = indexs[1];
				  if(opt == "update") {
						index = parseInt(index);
					} else {
						index = parseInt(index) + 1;
					}
				  
				  inputName = "collectionModelToPublishModels["+index+"]";
				  trObj = "<tr id='index_"+index+"'>";
			 }
			 
			trObj += "<td class='tdFieldName'><input type='hidden' name='"+inputName+".fieldName' value='"+name+"'/><span>"+name+"</span></td>"
				  +"<td class='tdModelType'><input type='hidden' name='"+inputName+".modelType' value='"+modelType+"'/><span>"+modelType+"</span></td>"
				  +"<td class='tdDataType'><input type='hidden' name='"+inputName+".dataType' value='"+dataType+"'/><span>"+dataType+"</span></td>";
			
			var fieldValue="";
			if(modelType == "VALUE") {
			    if(dataType == "DATE") {
					fieldValue = $("#."+opt+"DateFieldValue:checked").val();
				} else {
					fieldValue = $("#"+opt+"NoDateFieldValue").val();
				}
			} else {
				fieldValue = $("#"+opt+"ExpressionFieldValue option:selected").val();
			}
			
			var filePath = $("#"+opt+"FilePath").val();
			var splitNums = $("#"+opt+"SplitNums").val();
			
			trObj += "<td class='tdFieldValue'><input type='hidden' name='"+inputName+".fieldValue' value='"+fieldValue+"'/><span>"+fieldValue+"</span></td>"
				  +"<td class='tdSplitNums'><input type='hidden' name='"+inputName+".splitNums' value='"+splitNums+"'/><span>"+splitNums+"</span></td>"
			      +"<td class='tdFilePath'><input type='hidden' name='"+inputName+".filePath' value='"+filePath+"'/><span>"+filePath+"</span></td>"
			      +"<td><a href='javascript:updateFieldModel(\"index_"+index+"\")'>修改</a>|<a href='javascript:deleteFieldModel(\"index_"+index+"\")' onclick='return confirm(\"您真的要做删除操作？\")'>删除</a></td></tr>";
			
			if(opt == "update") {
				lastTrId = $("#currentTrId").val();
				$("#"+lastTrId).replaceWith(trObj); 
			} else {
				listObj.append(trObj);
			}
	}
	
	function updateFieldModel(trId) {
			$("#currentTrId").val(trId);
			var currentTr = $("#"+trId);
			var fieldName = currentTr.find(".tdFieldName").find("span").html();
			var modelType = currentTr.find(".tdModelType").find("span").eq(0).html();
			var dataType = currentTr.find(".tdDataType").find("span").eq(0).html();
			var fieldValue = currentTr.find(".tdFieldValue").find("span").eq(0).html();
			var filePath = currentTr.find(".tdFilePath").find("span").eq(0).html();
			var splitNums = currentTr.find(".tdSplitNums").find("span").eq(0).html();
			
			$("#updateFieldName").val(fieldName);
			
			var expressionDivObj = $("#updateExpressionDiv");
			var noDateDivObj = $("#updateNoDateDiv");
			var dateDivObj = $("#updateDateDiv");
			
			expressionDivObj.hide();
			noDateDivObj.hide();
			dateDivObj.hide();
			
			$(".updateModelType").each(function(i){
				var modelTypeObj = $(this);
				if(modelTypeObj.val() == modelType) {
					modelTypeObj.attr("checked","true");
				}
			});
			$(".updateDataType").each(function(i){
				var dataTypeObj = $(this);
				if(dataTypeObj.val() == dataType) {
					dataTypeObj.attr("checked","true");
				}
			});
			
			if(modelType == "VALUE") {
			    if(dataType == "DATE") {
					$(".updateDateFieldValue").each(function(i){
						var dateFieldValueObj = $(this);
						if(dateFieldValueObj.val() == fieldValue) {
							dateFieldValueObj.attr("checked","true");
							}
						});
					dateDivObj.show();
				} else {
					$("#updateNoDateFieldValue").val(fieldValue);
					noDateDivObj.show();
				}
			} else {
				$("#updateExpressionFieldValue option").each(function(i){
					var expressionFieldValueObj = $(this);
					if(expressionFieldValueObj.val() == fieldValue) {
						expressionFieldValueObj.attr("selected","true");
					}
				});
				expressionDivObj.show();
			}
			
			$("#updateFilePath").val(filePath);
			$("#updateSplitNums").val(splitNums);
			$("#updateCollectionModelToPublishModel").dialog("open");
		}
	
	function checkFieldName(opt) {
		 var name = $("#"+opt+"FieldName").val();
	     var nameMsgObj = $("#"+opt+"FieldNameMsg");
	     
	     if($.trim(name) == "") {
	     	nameMsgObj.css("color","red").html("字段名称必须指定");
	     	return false;
	     } else {
	     	nameMsgObj.html("");
	     	return true;
	     }
	}
	
	function checkFieldValue(opt) {
		var modelType = $("."+opt+"ModelType:checked").val();
		var dataType = $("."+opt+"DataType:checked").val();
		
		var fieldValue = "";
		if(modelType == "VALUE") {
			    if(dataType == "DATE") {
					fieldValue = $("#."+opt+"DateFieldValue:checked").val();
				} else {
					fieldValue = $("#"+opt+"NoDateFieldValue").val();
				}
				
				if(dataType == "NUMBER") {
					var reg = new RegExp("^\\d+$");
					if(!reg.test($.trim(fieldValue))) {
						$("#"+opt+"NoDateDivMsg").css("color","red").html("必须填写数值！");
						return false;
					} else {
						$("#"+opt+"NoDateDivMsg").html("");
						return true;
					}
				} else if(dataType == "STRING") {
					if($.trim(fieldValue) == "") {
						$("#"+opt+"NoDateDivMsg").css("color","red").html("字段值不能为空！");
						return false;
					} else {
						$("#"+opt+"NoDateDivMsg").html("");
						return true;
					}
				} else {
					return true;
				} 
		} else {
			fieldValue = $("#"+opt+"ExpressionFieldValue option:selected").val();
			
			if($.trim(fieldValue) == "") {
				$("#"+opt+"ExpressionFieldValueMsg").css("color","red").html("字段值不能为空！");
				return false;
			} else {
				$("#"+opt+"ExpressionFieldValueMsg").html("");
				return true;
			}
		}
	}
	
	function checkSplitNums(opt) {
		var splitNums = $("#"+opt+"SplitNums").val();
		var reg = new RegExp("\\d+");
		
		alert(reg.test($.trim(splitNums)));
		if(!reg.test($.trim(splitNums))) {
			$("#"+opt+"SplitNumsMsg").css("color","red").html("截取字段必须为数字！");
			return false;
		} else {
			$("#"+opt+"SplitNumsMsg").html("");
			return true;
		}
	}
	
	function clearFieldModel(opt) {
		$("#"+opt+"FieldName").val("");
		$("#"+opt+"SplitNums").val("");
		$("#"+opt+"FilePath").val("");
		$("."+opt+"ModelType[value='EXPRESSION']").attr("checked","true");
		$("."+opt+"DataType[value='STRING']").attr("checked","true");
		var expressionDivObj = $("#"+opt+"ExpressionDiv");
		var noDateDivObj = $("#"+opt+"NoDateDiv");
		var dateDivObj = $("#"+opt+"DateDiv");
		
		$("#"+opt+"ExpressionFieldValue option[value='']").attr("selected","true");
		noDateDivObj.hide();
		dateDivObj.hide();
		expressionDivObj.show();
	}
		
		$(function() {
		$("#createCollectionModelToPublishModel").dialog({
			autoOpen: false,
			width: 600,
			modal: true,
			resizable: false,
			buttons: {
				"添加模型": function() { 
				   if(checkFieldName("create") & checkFieldValue("create") & checkSplitNums("create")) {
				   		createFieldModel('create');
				   		clearFieldModel("create");
				   		$(this).dialog("close"); 
				   }
				   
				}, 
				" 取消 ": function() { 
				    clearFieldModel("create");
					$(this).dialog("close"); 
				}
			}
		});
		
		$("#updateCollectionModelToPublishModel").dialog({
			autoOpen: false,
			width: 600,
			modal: true,
			resizable: false,
			buttons: {
				"修改模型": function() { 
				   if(checkFieldName("update") & checkFieldValue("update") & checkSplitNums("update")) {
				   		createFieldModel('update');
				   		clearFieldModel("update");
				   		$(this).dialog("close"); 
				   }
				}, 
				" 取消 ": function() { 
				    clearFieldModel("update");
					$(this).dialog("close"); 
				}
			}
		});
	});
	</script>
</head>
  <body>
       <div class="content_bg">
 	 	<div class="rhead">
 	 		<div class="rpos">当前位置:  数据采集 - 发布信息内容配置</div>
 	 	</div>
 	 	
 	 	<s:form action="createPublishConfig" theme="simple" onsubmit="return checkPublishConfig()">
 	 	<s:hidden name="publishConfig.id" id="publishConfigId"></s:hidden>
 	 	<s:hidden name="collectionTask.id" id="taskId"></s:hidden>
 	 	<s:hidden name="publishConfig.collectionDataCharCode" id="collectionDataCharCodeId" value="%{contentStrategy.charCode}"></s:hidden>
 	 	<div class="rhead">
 	 		<div class="textRow"><div class="textLabel">任务名称：</div>
 	 		<div class="textContent">
 	 		&nbsp;<s:property value="collectionTask.taskName" escape="false"/> <span id="taskMsg" style="color:red"></span>
 	 		</div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">应用根路径(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:textfield name="publishConfig.applicationRootPath" cssClass="textInfo" size="80" maxlength="100" id="applicationRootPath"/><span id="applicationRootPathMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">数据库管理系统(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:select name="publishConfig.db" cssClass="textInfo" list="#{'MYSQL':'MYSQL','SQLSERVER':'SQLSERVER','SQLSERVER2005':'SQLSERVER2005','ORACLE':'ORACLE'}"  id="db" onchange="changeDb()" headerKey="" headerValue="请选择"/><span id="dbMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">数据库主机(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:textfield name="publishConfig.host" cssClass="textInfo" size="80" maxlength="100" id="host"/><span id="hostMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">端口号(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:textfield name="publishConfig.port" cssClass="textInfo" size="20" maxlength="100" id="port"/><span id="portMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">数据库名称(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:textfield name="publishConfig.dbName" cssClass="textInfo" size="50" maxlength="100" id="dbName" /><span id="dbNameMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">数据库字符编码(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:select name="publishConfig.dbCharCode" cssClass="textInfo" list="#{'UTF-8':'UTF-8','GBK':'GBK','GB2312':'GB2312'}"  id="dbCharCode"/>
 	 		<span id="dbCharCodeMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">发布表名称(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:textfield name="publishConfig.publishTableName" cssClass="textInfo" size="50" maxlength="100" id="publishTableName" /><span id="publishTableNameMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">用户名(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:textfield name="publishConfig.userName" cssClass="textInfo" size="50" maxlength="100" id="userName" /><span id="userNameMsg" style="color:red"></span></div>
 	 		</div>
 	 		<div class="textRow"><div class="textLabel">用户密码(<span style="color:red">*</span>)：</div>
 	 		<div class="textContent"><s:password name="publishConfig.password" cssClass="textInfo" size="50" value="publishConfig.password" maxlength="100" id="password" /><span id="passwordMsg" style="color:red"></span></div>
 	 		</div>
 	 		
 	 		<div class="textRow" id="selfStrategy"><div class="textLabel">&nbsp;</div>
	 	 		<div class="textContent"><a href="javascript:addFieldModel()">添加发布字段模型</a></div>
	 	 		</div>
	 	 		
	 	 	 	<div class="list" style="margin-left:130px;width:900px">
	 	 			<table id="fieldModelList" width="80%" cellpadding="0" cellspacing="0">
	 	 				<tr id="index_-1">
	 	 					<th>字段名称</th>
	 	 					<th>字段模型</th>
	 	 					<th>数据类型</th>
	 	 					<th>字段值</th>
	 	 					<th>字符截取长度</th>
	 	 					<th>文件保存相对路径</th>
	 	 					<th>操作</th>
	 	 				</tr>
	 	 				<s:iterator value="collectionModelToPublishModels" var="collectionModelToPublishModel" status="stat">
	 	 				 <s:hidden name="collectionModelToPublishModels[%{#stat.index}].id"/>
	 	 				<tr id="index_<s:property value="#stat.index" escape="false"/>">
	 	 				<td class="tdFieldName"><s:hidden name="collectionModelToPublishModels[%{#stat.index}].fieldName" />
	 	 					<span><s:property value="#collectionModelToPublishModel.fieldName" escape="false"/></span>
	 	 				</td>
	 	 				<td class="tdModelType"><s:hidden name="collectionModelToPublishModels[%{#stat.index}].modelType" />
	 	 				<span><s:property value="#collectionModelToPublishModel.modelType" escape="false"/></span>
	 	 				</td>
	 	 				<td class="tdDataType"><s:hidden name="collectionModelToPublishModels[%{#stat.index}].dataType" />
	 	 				<span><s:property value="#collectionModelToPublishModel.dataType" escape="false"/></span>
	 	 				</td>
	 	 				<td class="tdFieldValue"><s:hidden name="collectionModelToPublishModels[%{#stat.index}].fieldValue" />
	 	 				<span><s:property value="#collectionModelToPublishModel.fieldValue" escape="false"/></span></td>
	 	 				<td class="tdSplitNums"><s:hidden name="collectionModelToPublishModels[%{#stat.index}].splitNums" />
	 	 				<span><s:property value="#collectionModelToPublishModel.splitNums" escape="false"/></span>
	 	 				</td>
	 	 				<td class="tdFilePath"><s:hidden name="collectionModelToPublishModels[%{#stat.index}].filePath" />
	 	 				<span><s:property value="#collectionModelToPublishModel.filePath" escape="false"/></span>
	 	 				</td>
	 	 				<td><a href="javascript:updateFieldModel('index_<s:property value="#stat.index" escape="false"/>')">修改</a>|<a href="javascript:deleteFieldModel('index_<s:property value="#stat.index" escape="false"/>')" onclick="return confirm('您真的要做删除操作？')">删除</a></td>
	 	 				</tr>
	 	 				</s:iterator>
	 	 			</table>
	 	 		</div>
 	 	</div>
 	 	<div class="rhead">
 	 		<span style="margin-left:140px"><s:submit value="提交"></s:submit></span>
 	 	</div>
 	 		</s:form>
 	   </div>
 	   
 	   <div id="createCollectionModelToPublishModel" title="添加发布字段模型" style="display:none">
	  	    	<div>字段名称：<s:textfield name="collectionModelToPublishModel.fieldName" cssClass="textInfo" maxlength="100" id="createFieldName"/>
	  	    	<span id="createFieldNameMsg"></span></div>
	  	    	<div>字段模型：<s:radio name="collectionModelToPublishModel.createModelType" list="#{'EXPRESSION':'表达式','VALUE':'固定值'}" value="'EXPRESSION'" cssClass="createModelType" onchange="changeModelType('create')"  id="createModelType"/>
	  	    	<span id="createModelTypeMsg"></span></div>
	  	    	<div>数据类型：<s:radio name="collectionModelToPublishModel.createDataType" list="#{'STRING':'字符串','NUMBER':'数值','DATE':'时间'}" value="'STRING'" cssClass="createDataType" onchange="changeDataType('create')" id="createDataType"/>
	  	    	<span id="createDataTypeMsg"></span>
	  	    	</div>
		  	    
	  	    	<div id="createExpressionDiv">
		  	    	<div>批配采集字段：
			  	    	<s:select name="collectionModelToPublishModel.fieldValue"  list="baseStrategies" listKey="fieldName" listValue="fieldName" headerKey="" headerValue="请选择" id="createExpressionFieldValue" />
			  	    <span id="createExpressionFieldValueMsg"></span></div>
		  	    </div>
		  	    
	  	    	<div id="createNoDateDiv" style="display:none">字段值：
	  	    	<s:textfield name="collectionModelToPublishModel.fieldValue" cssClass="textInfo" maxlength="100" id="createNoDateFieldValue"/>
	  	    	<span id="createNoDateDivMsg"></span></div>
	  	    	<div id="createDateDiv" style="display:none">字段值：
	  	    	<s:radio name="collectionModelToPublishModel.createFieldValue" list="#{'yyyy-MM-dd':'[yyyy-MM-dd]','yyyy-MM-dd HH:mm:ss':'[yyyy-MM-dd HH:mm:ss]'}" value="'yyyy-MM-dd'" cssClass="createDateFieldValue"  id="createDateFieldValue"/>
	  	    	<span id="createDateDivMsg"></span>
	  	    	</div>
	  	    	
	  	    	<div>字符截取长度：
	  	    	<s:textfield name="collectionModelToPublishModel.splitNums" cssClass="textInfo" maxlength="100" id="createSplitNums"/>
	  	    	<span id="createSplitNumsMsg"></span>
	  	    	</div>
	  	    	
	  	    	<div>文件保存相对路径：
	  	    	<s:textfield name="collectionModelToPublishModel.filePath" cssClass="textInfo" maxlength="100" id="createFilePath"/>
	  	    	<span id="createFilePathMsg"></span>
	  	    	</div>
  	   </div>
  	  
  	   <div id="updateCollectionModelToPublishModel" title="修改发布字段模型" style="display:none">
	  	    	<div>字段名称：<s:textfield name="collectionModelToPublishModel.fieldName" cssClass="textInfo" maxlength="100" id="updateFieldName"/>
	  	    	<span id="updateFieldNameMsg"></span></div>
	  	    	<div>字段模型：<s:radio name="collectionModelToPublishModel.updateModelType" list="#{'EXPRESSION':'表达式','VALUE':'固定值'}" value="'EXPRESSION'" cssClass="updateModelType" onchange="changeModelType('update')"  id="updateModelType"/>
	  	    	<span id="updateModelTypeMsg"></span></div>
	  	    	<div>数据类型：<s:radio name="collectionModelToPublishModel.updateDataType" list="#{'STRING':'字符串','NUMBER':'数值','DATE':'时间'}" value="'STRING'" cssClass="updateDataType" onchange="changeDataType('update')" id="updateDataType"/>
	  	    	<span id="updateDataTypeMsg"></span>
	  	    	</div>
		  	    
	  	    	<div id="updateExpressionDiv" style="display:none">
		  	    	<div>批配采集字段：
			  	    <s:select name="collectionModelToPublishModel.fieldValue"  list="baseStrategies" listKey="fieldName" listValue="fieldName" headerKey="" headerValue="请选择" id="updateExpressionFieldValue" />
			  	    <span id="updateExpressionFieldValueMsg"></span></div>
		  	    </div>
		  	    
	  	    	<div id="updateNoDateDiv" style="display:none">字段值：
	  	    	<s:textfield name="collectionModelToPublishModel.fieldValue" cssClass="textInfo" maxlength="100" id="updateNoDateFieldValue"/>
	  	    	<span id="updateNoDateDivMsg"></span></div>
	  	    	<div id="updateDateDiv" style="display:none">字段值：
	  	    	<s:radio name="collectionModelToPublishModel.updateFieldValue" list="#{'yyyy-MM-dd':'[yyyy-MM-dd]','yyyy-MM-dd HH:mm:ss':'[yyyy-MM-dd HH:mm:ss]'}" value="'yyyy-MM-dd'" cssClass="updateDateFieldValue"  id="updateDateFieldValue"/>
	  	    	<span id="updateDateDivMsg"></span>
	  	    	</div>
	  	    	
	  	    	<div>字符截取长度：
	  	    	<s:textfield name="collectionModelToPublishModel.splitNums" cssClass="textInfo" maxlength="100" id="updateSplitNums"/>
	  	    	<span id="updateSplitNumsMsg"></span>
	  	    	</div>
	  	    	
	  	    	<div>文件保存相对路径：
	  	    	<s:textfield name="collectionModelToPublishModel.filePath" cssClass="textInfo" maxlength="100" id="updateFilePath"/>
	  	    	<span id="updateFilePathMsg"></span>
	  	    	</div>
  	   </div>
  	  <input type="hidden" name="currentTrId" id="currentTrId"/>
  </body>
</html>



